<?php

use yii\helpers\Html;
use yii\widgets\DetailView;

/* @var $this yii\web\View */
/* @var $model backend\models\TermCourse */
$kc = $model->kC;
$this->title = $kc->KCMC;
$this->params['breadcrumbs'][] = ['label' => 'Term Courses', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
\yii\web\YiiAsset::register($this);
?>
<div class="term-course-view">

    <div class="panel">
		<div class="panel-heading">
            基本信息
		</div>
        <div class="panel-body">        
            <table id="t1" class="table table-bordered">
                <tr>
                    <th>课程名称：</th>
                    <td><?= Html::encode($kc->KCMC) ?></td>
                    <th>课程代码：</th>
                    <td><?= Html::encode($kc->KCDM) ?></td>
                </tr>
                <tr>
                    <th>课程类别：</th>
                    <td><?= Html::encode($kc->KCLB) ?></td>
                    <th>课程性质：</th>
                    <td><?= Html::encode($kc->KCXZ) ?></td>
                </tr>
                <tr>
                    <th>学分：</th>
                    <td><?= Html::encode($kc->XF) ?></td>
                    <th>总学时：</th>
                    <td><?= Html::encode($kc->ZXS) ?></td>
                </tr>
                <tr>
                    <th>理论学时：</th>
                    <td><?= Html::encode($kc->LLXS) ?></td>
                    <th>实验学时：</th>
                    <td><?= Html::encode($kc->SYXS) ?></td>
                </tr>
                <tr>
                    <th>实践学时：</th>
                    <td><?= Html::encode($kc->SJXS) ?></td>
                    <th>考核方式：</th>
                    <td><?= Html::encode($kc->KHFS) ?></td>
                </tr>
                <tr>
                    <th>教学大纲：</th>
                    <td><?= Html::a(basename($kc->JXDG), '@web/'.$kc->JXDG, ['target'=>'_blank']) ?></td>
                    <th>教材：</th>
                    <td><?= Html::encode($kc->JC) ?></td>
                </tr>
                <tr>
                    <th>创建时间：</th>
                    <td><?= Html::encode($kc->CJSJ) ?></td>
                    <th>更新时间：</th>
                    <td><?= Html::encode($kc->GXSJ) ?></td>
                </tr>
                <tr>
                    <th>课程简介：</th>
                    <td colspan="3"><?= Html::encode($kc->KCJJ) ?></td>
                </tr>
            </table>
        </div>
	</div>
    
    <div class="panel">
		<div class="panel-heading">
            适用专业
		</div>
        <div class="panel-body">        
            <table id="t2" class="table table-hover table-bordered">
                <tr>
                    <th>序号</th>
                    <th>专业名称</th>
                    <th>专业代码</th>
                    <th>目录版本</th>
                    <th>专业类别</th>
                    <th>招生类别</th>
                    <th>教学形式</th>
                    <th>学制</th>
                    <th>排课学期序号</th>
                </tr>
                <?php foreach($kc->majorCourses as $kk){ $idx++; $zy=$kk->zY?>
                <tr>
                    <td><?= $idx ?></td>
                    <td><?= Html::encode($zy->ZYMC) ?></td>
                    <td><?= Html::encode($zy->ZYDM) ?></td>
                    <td><?= Html::encode($zy->ZYMLBB) ?></td>
                    <td><?= Html::encode($zy->ZYLB) ?></td>
                    <td><?= Html::encode($zy->ZSLB) ?></td>
                    <td><?= Html::encode($zy->JXXS) ?></td>
                    <td><?= Html::encode($zy->XZ) ?></td>
                    <td><?= Html::encode($kk->PKXQXH) ?></td>
                </tr>
                <?php } ?>
            </table>
        </div>
	</div>


<style>
#t1 th{
    text-align:right;
}
#t2 th,#t2 td{
    text-align:center;
}
</style>

</div>
